package com.java.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.java.dao.PlatformMapper;
import com.java.model.Platform;
import com.java.service.PlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlatformServiceImpl implements PlatformService {

    @Autowired
    private PlatformMapper platformMapper;

    @Override
    public PageInfo<Platform> list(Platform platform){
        PageHelper.startPage(platform.getPageNum(),platform.getPageSize());
        List<Platform> list = platformMapper .typeList(platform);
        return new PageInfo<>(list);
    }
}
